AssetWise CONNECT Edition Implementation Guide

To Configure WSG

Follow these instructions to configure and install WSG.
Note: If you receive an error message in AssetWise CONNECT Edition related to WSG, see Troubleshooting.
  1. Browse to locate and launch the latest WSG build.
  2. Run Bentley Web Services Gateway 02.06.msi.
  3. Click Install.
  4. Click Next, accept the End User License Agreement, then select an install directory, and then click Finish.
  5. From the same directory, locate and run the latest version of the WSG eB plugin, Bentley WSG eB plugin vXXXX, where XXXX represents the latest version number.
  6. From the Start menu, select Deploy Bentley Web Services Gateway 02.06.
  7. Select the website to which the website will be added.
    Tip: Accept the Default Web Site, unless there are multiple websites on the server.
  8. Enter an application name, for example, "wsg".
  9. Confirm that Use URL redirection is not selected.
  10. Select a directory for temporary files, and in the second box enter a "*" for the URL of trusted origins. For example,
  11. Select the Bentley eB Plugin plugin, and then click Next.
  12. In Backend Servers, enter the fully qualified domain name(s) of the child AssetWise backend server(s).
  13. Leave Https Only Domains blank, and then click Next.
  14. Leave eB Default Document Creation Settings List blank.
  15. Click Deploy.
  16. Browse to the WSG installation folder, for example, C:\inetpub\wwwroot\WSG, and then using a text editor, open web.config.
  17. You can enter 3000 for the httpRuntime maxUrlLength value, if you want WSG to accommodate larger URL names. For example:
    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.5" />
      </startup>
      <system.web>
        <httpRuntime maxUrlLength="3000" />
  18. After deployment, include the following <assemblyBinding> content within <configuration> <runtime> sections:
          <assemblyBinding>
             <dependentAssembly>
                <assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral"/>\
                <bindingRedirect oldVersion="1.0.0.0-6.23.1.0" newVersion="6.23.1.0"/>\
             </dependentAssembly>
             <dependentAssembly>
                <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>\
                <bindingRedirect oldVersion="4.0.0.0-6.0.0.2" newVersion="6.0.0.2"/>\
             </dependentAssembly>
             <dependentAssembly>
                <assemblyIdentity name="IdentityModel" publicKeyToken="null" culture="neutral"/>\
                <bindingRedirect oldVersion="1.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>\
             </dependentAssembly>
             <dependentAssembly>
                <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />\
                <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />\
             </dependentAssembly>
          </assemblyBinding>
        
  19. After deployment, edit the value assigned to AccessControlAllowOrigin value to "*". To have tighter security, set this value to the known website URL(s) that will be communicating with WSG ([http or https]://[domain or machine]/[website name]. For example,
    <add key="AccessControlAllowOrigin" value="*" />
    Note: The value can include multiple URLs, separated by commas.
  20. If you are in a non-production environment (i.e., demo) and are not using https, you can set the AllowNonSecureHttp value to "true". This step is optional. For example,
    <add key="AllowNonSecureHttp" value="true" />
  21. If you are running in QA and a self-signed certificate is being used by AssetWise, manually add each of the following keys:
    <add key="Bentley.eB.HttpsOnlyDomains" value="" />
    <add key="Bentley.eB.StsTokenLifetime" value="60" />
    <add key="Bentley.eB.ImsAuthUri" value="https://qa-ims.bentley.com/" />
    <add key="Bentley.eB.StsFederationMetadataUri" value="federationmetadata/2007-06/federationmetadata.xml" />
    <add key="Bentley.eB.SslValidationMode" value="Ignore" />
    <add key="Bentley.eB.ImsRoot" value="https://qa-ims.bentley.com/" />
    <add key="Bentley.eB.StsIssuerName" value="https://qa-ims.bentley.com/" />
    <add key="Bentley.eB.StsIssuerCertificate" value="C28EFD602F631BD2FBCD38A3402C88A87AA5379A" />
    Important: Failure to add these settings will lead to WSG not working with AssetWise.
    Note: SslValidationMode should not be set to Ignore in Production level environments.
  22. For enhanced performance, confirm that the system.web compilation.debug attribute value is set to "false". For example,
    <system.web>
        <compilation debug="false" targetFramework="4.6.2" />
  23. To control how frequently the plugin checks for an updated AssetWise EC Schema document the synchronization time, add an <appSettings> key to ecom.config, as follows:
    <add key="EBSchemaSynchronizationTimeInSeconds" value="30000"/>
    Tip: Set the value to represent the wait time before WSG checks for updates. Note that this value affects performance of the web application, therefore, consider using a low number during initial setup, and then increasing its value after the initial setup has been completed, and normal operation is in effect. \See "Configuring schema synchronization time in eB EC Plugin", in Web Services Gateway (WSG) API 2.5, for more details.
    Note: If you do not set this option, the only way to get WSG and the web app to retrieve new schemas, is by recycling the WSG app pool.
  24. In ecom.config, locate the <EBECPluginCommunity List> section within the <SupplementalSchemas> section, and insert a <Community> </Community> section including the domain name, community name, user name and password for each AssetWise Community that it serves. For example, the following community list displays two communities, "community1" and "community2":
    </SupplementalSchemas>
          <EBECPluginCommunityList>
              <Community>
                  <DomainName>server. hosting.com</DomainName>
                  <CommunityName> community1 </CommunityName>
                  <UserName>admin</UserName>
                  <Password>password</Password>
              </Community> 
              <Community>
                  <DomainName>server.bentley.com</DomainName>
                  <CommunityName>community2</CommunityName>
                  <UserName>admin</UserName>
                  <Password> password </Password>
              </Community> 
          </EBECPluginCommunityList>
        <ServiceVersions>
    
    Note: Ensure that there is one <Community> section for each community, and remove each <Community> section that is not relevant.
  25. Open a command prompt in Administrator mode, and perform an IISReset to ensure that any changes made to web.config and/or ecom.config are updated.